8:


-- While the object is existing...
function Update(self)

-- Go through all actors.
   for actor in MovableMan.Actors do

-- Uses a function plus a vector property to store the distance between the actor and scripted object in a variable.
      local distcheck = SceneMan:shortestDistance(self.Pos,actor.Pos,true).Magnitude

-- Statement checking if the distance check (variable "local distcheck") is less than 30. If so, then do the action...
      if distcheck < 30 then

-- GibThis() is a function that makes the targeted object gib. Since the target is "self" then the scripted object gibs.
         self:GibThis()

-- Stop the for loop.
         break

-- End of the "if" statement.
      end

-- End of the "for" statement.
   end

-- End of the "function Update(self)".
end